from gameset.phoenicia.base import *

from ..agriculture import Wheat
from .beekeeping import Honey
from .fruitpress import Oil
from .pottery import Pottery
from .water import Water


class Flour(PartiallyProcessedFood):
    singular  =_ ('Flour')
    plural    =_ ('Flour')


class Sugar(PartiallyProcessedFood):
    singular  =_ ('Flour')
    plural    =_ ('Flour')


class Bread(Food):
    singular  =_ ('Bread')
    plural    =_ ('Bread')
    happiness =_ (1.0)
    consumed  =_ (1.0)


class Cakes(Food):
    singular  =_ ('Cake')
    plural    =_ ('Cakes')
    happiness =_ (1.0)
    consumed  =_ (0.2)


class Pastries(Food):
    singular  =_ ('Pastry')
    plural    =_ ('Pastries')
    happiness =_ (1.0)
    consumed  =_ (0.1)


class Mill(Workshop):
    name     =_ ('Mill')
    color    =_ (White)
    cost     =_ (80)
    size     =_ (2)
    staff    =_ (4)
    produces =_ (Production(input = (Wheat(1), Pottery(1)), output = Flour(3), duration = 0.5))


class Bakery(Workshop):
    name     =_ ('Bakery')
    color    =_ (White + Orange)
    cost     =_ (120)
    size     =_ (3)
    staff    =_ (8)
    produces =_ (Production(input = (Flour(5), Oil(1), Water(10)), output = Bread(3), duration = 0.5))


class SugarBakery(Workshop):
    name     =_ ('Sugar Bakery')
    color    =_ (White + Blue)
    cost     =_ (150)
    size     =_ (3)
    staff    =_ (8)
    produces =_ (Production(input = (Flour(5), Honey(1), Water(10)), output = Cakes(3),    duration = 0.5),
                 Production(input = (Flour(5), Sugar(1), Water(10)), output = Pastries(3), duration = 0.5))
